import { baseUrl } from '@/libs/baseUrl.js'


// 免登码查询 / 获取openId
export const getOpenIdApi = (code)=>{
	return uni.request({
		url: baseUrl + '/user/selectByCode',
		data:{
			code:code
		}
	})
}


// 查询用户信息
export const selectUserInfoApi = (openId)=>{
	return uni.request({
		url:baseUrl+'/user/select',
		data:{
			openId:openId
		}
	})
}


// 注册用户
export const registerUserApi = (data)=>{
	return uni.request({
		url: baseUrl + '/user/add',
		data:{
			openId:data.openId,
			userProfilePicture:data.userProfilePicture,
			userNearName:data.userNearName
		}
	})
}